package com.wc.算法基础课.D第四讲数学知识.求组合数.满足条件的01序列;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/1/23 22:25
 * @description https://www.acwing.com/problem/content/891/
 */
public class Main {
    static int P = (int) 1e9 + 7;
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static int n;

    // 画图为计算
    // 视频https://www.acwing.com/video/310/
    public static void main(String[] args) {
        n = sc.nextInt();
//        out.println((C(2L * n, n) - C(2L * n, n - 1) + P) % P);
        out.println((C(2L * n, n) * qkm(n + 1, P - 2, P)) % P);
        out.flush();
    }

    static long C(long a, long b) {
        long res = 1;
        for (long i = 1, j = a; i <= b; i++, j--) {
            res = res * j % P;
            res = res * qkm(i, P - 2, P) % P;
        }
        return res;
    }

    static long qkm(long a, long b, long p) {
        long res = 1;
        while (b > 0) {
            if ((b & 1) == 1) res = res * a % p;
            a = a * a % p;
            b >>= 1;
        }
        return res;
    }

}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}
